<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <PackageDescription>Provides types supporting Code Access Security (CAS).</PackageDescription>
    <IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>

    <!-- TODO https://github.com/dotnet/runtime/issues/90400: Annotate for nullable reference types -->
    <Nullable>disable</Nullable>
    <NoWarn>$(NoWarn);nullable</NoWarn>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
    <Compile Include="System\ApplicationIdentity.cs" />
    <Compile Include="System\Configuration\ConfigurationPermission.cs" />
    <Compile Include="System\Configuration\ConfigurationPermissionAttribute.cs" />
    <Compile Include="System\Data\Common\DBDataPermission.cs" />
    <Compile Include="System\Data\Common\DBDataPermissionAttribute.cs" />
    <Compile Include="System\Data\Odbc\OdbcPermission.cs" />
    <Compile Include="System\Data\Odbc\OdbcPermissionAttribute.cs" />
    <Compile Include="System\Data\OleDb\OleDbPermission.cs" />
    <Compile Include="System\Data\OleDb\OleDbPermissionAttribute.cs" />
    <Compile Include="System\Data\OracleClient\OraclePermission.cs" />
    <Compile Include="System\Data\OracleClient\OraclePermissionAttribute.cs" />
    <Compile Include="System\Data\SqlClient\SqlClientPermission.cs" />
    <Compile Include="System\Data\SqlClient\SqlClientPermissionAttribute.cs" />
    <Compile Include="System\Diagnostics\EventLogPermission.cs" />
    <Compile Include="System\Diagnostics\EventLogPermissionAccess.cs" />
    <Compile Include="System\Diagnostics\EventLogPermissionAttribute.cs" />
    <Compile Include="System\Diagnostics\EventLogPermissionEntry.cs" />
    <Compile Include="System\Diagnostics\EventLogPermissionEntryCollection.cs" />
    <Compile Include="System\Diagnostics\PerformanceCounterPermission.cs" />
    <Compile Include="System\Diagnostics\PerformanceCounterPermissionAccess.cs" />
    <Compile Include="System\Diagnostics\PerformanceCounterPermissionAttribute.cs" />
    <Compile Include="System\Diagnostics\PerformanceCounterPermissionEntry.cs" />
    <Compile Include="System\Diagnostics\PerformanceCounterPermissionEntryCollection.cs" />
    <Compile Include="System\DirectoryServices\DirectoryServicesPermission.cs" />
    <Compile Include="System\DirectoryServices\DirectoryServicesPermissionAccess.cs" />
    <Compile Include="System\DirectoryServices\DirectoryServicesPermissionAttribute.cs" />
    <Compile Include="System\DirectoryServices\DirectoryServicesPermissionEntry.cs" />
    <Compile Include="System\DirectoryServices\DirectoryServicesPermissionEntryCollection.cs" />
    <Compile Include="System\Drawing\Printing\PrintingPermission.cs" />
    <Compile Include="System\Drawing\Printing\PrintingPermissionAttribute.cs" />
    <Compile Include="System\Drawing\Printing\PrintingPermissionLevel.cs" />
    <Compile Include="System\Net\DnsPermission.cs" />
    <Compile Include="System\Net\DnsPermissionAttribute.cs" />
    <Compile Include="System\Net\EndpointPermission.cs" />
    <Compile Include="System\Net\Mail\SmtpAccess.cs" />
    <Compile Include="System\Net\Mail\SmtpPermission.cs" />
    <Compile Include="System\Net\Mail\SmtpPermissionAttribute.cs" />
    <Compile Include="System\Net\NetworkAccess.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInformationAccess.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInformationPermission.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInformationPermissionAttribute.cs" />
    <Compile Include="System\Net\PeerToPeer\Collaboration\PeerCollaborationPermission.cs" />
    <Compile Include="System\Net\PeerToPeer\Collaboration\PeerCollaborationPermissionAttribute.cs" />
    <Compile Include="System\Net\PeerToPeer\PnrpPermission.cs" />
    <Compile Include="System\Net\PeerToPeer\PnrpPermissionAttribute.cs" />
    <Compile Include="System\Net\PeerToPeer\PnrpScope.cs" />
    <Compile Include="System\Net\SocketPermission.cs" />
    <Compile Include="System\Net\SocketPermissionAttribute.cs" />
    <Compile Include="System\Net\TransportType.cs" />
    <Compile Include="System\Net\WebPermission.cs" />
    <Compile Include="System\Net\WebPermissionAttribute.cs" />
    <Compile Include="System\Security\CodeAccessPermission.cs" />
    <Compile Include="System\Security\HostProtectionException.cs" />
    <Compile Include="System\Security\HostSecurityManager.cs" />
    <Compile Include="System\Security\HostSecurityManagerOptions.cs" />
    <Compile Include="System\Security\IEvidenceFactory.cs" />
    <Compile Include="System\Security\ISecurityPolicyEncodable.cs" />
    <Compile Include="System\Security\NamedPermissionSet.cs" />
    <Compile Include="System\Security\Permissions\DataProtectionPermission.cs" />
    <Compile Include="System\Security\Permissions\DataProtectionPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\DataProtectionPermissionFlags.cs" />
    <Compile Include="System\Security\Permissions\EnvironmentPermission.cs" />
    <Compile Include="System\Security\Permissions\EnvironmentPermissionAccess.cs" />
    <Compile Include="System\Security\Permissions\EnvironmentPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\FileDialogPermission.cs" />
    <Compile Include="System\Security\Permissions\FileDialogPermissionAccess.cs" />
    <Compile Include="System\Security\Permissions\FileDialogPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\FileIOPermission.cs" />
    <Compile Include="System\Security\Permissions\FileIOPermissionAccess.cs" />
    <Compile Include="System\Security\Permissions\FileIOPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\GacIdentityPermission.cs" />
    <Compile Include="System\Security\Permissions\GacIdentityPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\HostProtectionAttribute.cs" />
    <Compile Include="System\Security\Permissions\HostProtectionResource.cs" />
    <Compile Include="System\Security\Permissions\IDRole.cs" />
    <Compile Include="System\Security\Permissions\IsolatedStorageContainment.cs" />
    <Compile Include="System\Security\Permissions\IsolatedStorageFilePermission.cs" />
    <Compile Include="System\Security\Permissions\IsolatedStorageFilePermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\IsolatedStoragePermission.cs" />
    <Compile Include="System\Security\Permissions\IsolatedStoragePermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\IUnrestrictedPermission.cs" />
    <Compile Include="System\Security\Permissions\KeyContainerPermission.cs" />
    <Compile Include="System\Security\Permissions\KeyContainerPermissionAccessEntry.cs" />
    <Compile Include="System\Security\Permissions\KeyContainerPermissionAccessEntryCollection.cs" />
    <Compile Include="System\Security\Permissions\KeyContainerPermissionAccessEntryEnumerator.cs" />
    <Compile Include="System\Security\Permissions\KeyContainerPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\KeyContainerPermissionFlags.cs" />
    <Compile Include="System\Security\Permissions\MediaPermission.cs" />
    <Compile Include="System\Security\Permissions\PermissionSetAttribute.cs" />
    <Compile Include="System\Security\Permissions\PrincipalPermission.cs" />
    <Compile Include="System\Security\Permissions\PrincipalPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\PublisherIdentityPermission.cs" />
    <Compile Include="System\Security\Permissions\PublisherIdentityPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\ReflectionPermission.cs" />
    <Compile Include="System\Security\Permissions\ReflectionPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\ReflectionPermissionFlag.cs" />
    <Compile Include="System\Security\Permissions\RegistryPermission.cs" />
    <Compile Include="System\Security\Permissions\RegistryPermissionAccess.cs" />
    <Compile Include="System\Security\Permissions\RegistryPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\ResourcePermissionBase.cs" />
    <Compile Include="System\Security\Permissions\ResourcePermissionBaseEntry.cs" />
    <Compile Include="System\Security\Permissions\SecurityPermission.cs" />
    <Compile Include="System\Security\Permissions\SiteIdentityPermission.cs" />
    <Compile Include="System\Security\Permissions\SiteIdentityPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\StorePermission.cs" />
    <Compile Include="System\Security\Permissions\StorePermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\StorePermissionFlags.cs" />
    <Compile Include="System\Security\Permissions\StrongNameIdentityPermission.cs" />
    <Compile Include="System\Security\Permissions\StrongNameIdentityPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\StrongNamePublicKeyBlob.cs" />
    <Compile Include="System\Security\Permissions\TypeDescriptorPermission.cs" />
    <Compile Include="System\Security\Permissions\TypeDescriptorPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\TypeDescriptorPermissionFlags.cs" />
    <Compile Include="System\Security\Permissions\UIPermission.cs" />
    <Compile Include="System\Security\Permissions\UIPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\UIPermissionClipboard.cs" />
    <Compile Include="System\Security\Permissions\UIPermissionWindow.cs" />
    <Compile Include="System\Security\Permissions\UrlIdentityPermission.cs" />
    <Compile Include="System\Security\Permissions\UrlIdentityPermissionAttribute.cs" />
    <Compile Include="System\Security\Permissions\WebBrowserPermission.cs" />
    <Compile Include="System\Security\Permissions\ZoneIdentityPermission.cs" />
    <Compile Include="System\Security\Permissions\ZoneIdentityPermissionAttribute.cs" />
    <Compile Include="System\Security\Policy\AllMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\ApplicationDirectory.cs" />
    <Compile Include="System\Security\Policy\ApplicationDirectoryMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\ApplicationTrust.cs" />
    <Compile Include="System\Security\Policy\ApplicationTrustCollection.cs" />
    <Compile Include="System\Security\Policy\ApplicationTrustEnumerator.cs" />
    <Compile Include="System\Security\Policy\ApplicationVersionMatch.cs" />
    <Compile Include="System\Security\Policy\CodeConnectAccess.cs" />
    <Compile Include="System\Security\Policy\CodeGroup.cs" />
    <Compile Include="System\Security\Policy\FileCodeGroup.cs" />
    <Compile Include="System\Security\Policy\FirstMatchCodeGroup.cs" />
    <Compile Include="System\Security\Policy\GacInstalled.cs" />
    <Compile Include="System\Security\Policy\GacMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\Hash.cs" />
    <Compile Include="System\Security\Policy\HashMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\IIdentityPermissionFactory.cs" />
    <Compile Include="System\Security\Policy\IMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\NetCodeGroup.cs" />
    <Compile Include="System\Security\Policy\PermissionRequestEvidence.cs" />
    <Compile Include="System\Security\Policy\PolicyException.cs" />
    <Compile Include="System\Security\Policy\PolicyLevel.cs" />
    <Compile Include="System\Security\Policy\PolicyStatement.cs" />
    <Compile Include="System\Security\Policy\PolicyStatementAttribute.cs" />
    <Compile Include="System\Security\Policy\Publisher.cs" />
    <Compile Include="System\Security\Policy\PublisherMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\Site.cs" />
    <Compile Include="System\Security\Policy\SiteMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\StrongName.cs" />
    <Compile Include="System\Security\Policy\StrongNameMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\TrustManagerContext.cs" />
    <Compile Include="System\Security\Policy\UnionCodeGroup.cs" />
    <Compile Include="System\Security\Policy\Url.cs" />
    <Compile Include="System\Security\Policy\UrlMembershipCondition.cs" />
    <Compile Include="System\Security\Policy\Zone.cs" />
    <Compile Include="System\Security\Policy\ZoneMembershipCondition.cs" />
    <Compile Include="System\Security\PolicyLevelType.cs" />
    <Compile Include="System\Security\SecurityContext.cs" />
    <Compile Include="System\Security\SecurityContextSource.cs" />
    <Compile Include="System\Security\SecurityManager.cs" />
    <Compile Include="System\Security\SecurityState.cs" />
    <Compile Include="System\Security\SecurityZone.cs" />
    <Compile Include="System\Security\XmlSyntaxException.cs" />
    <Compile Include="System\ServiceProcess\ServiceControllerPermission.cs" />
    <Compile Include="System\ServiceProcess\ServiceControllerPermissionAccess.cs" />
    <Compile Include="System\ServiceProcess\ServiceControllerPermissionAttribute.cs" />
    <Compile Include="System\ServiceProcess\ServiceControllerPermissionEntry.cs" />
    <Compile Include="System\ServiceProcess\ServiceControllerPermissionEntryCollection.cs" />
    <Compile Include="System\Transactions\DistributedTransactionPermission.cs" />
    <Compile Include="System\Transactions\DistributedTransactionPermissionAttribute.cs" />
    <Compile Include="System\Web\AspNetHostingPermission.cs" />
    <Compile Include="System\Web\AspNetHostingPermissionAttribute.cs" />
    <Compile Include="System\Web\AspNetHostingPermissionLevel.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <Compile Include="System\Xaml\Permissions\XamlLoadPermission.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
    <Compile Include="$(LibrariesProjectRoot)System.Private.CoreLib\src\System\Security\IStackWalk.cs"
             Link="System\Security\IStackWalk.cs" />
    <Compile Include="$(LibrariesProjectRoot)System.Private.CoreLib\src\System\Security\PermissionSet.cs"
             Link="System\Security\PermissionSet.cs" />
    <Compile Include="$(LibrariesProjectRoot)System.Private.CoreLib\src\System\Security\Permissions\PermissionState.cs"
             Link="System\Security\Permissions\PermissionState.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.Windows.Extensions\src\System.Windows.Extensions.csproj" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <Reference Include="System.Configuration" />
    <Reference Include="System.Data.OracleClient" />
    <Reference Include="System.DirectoryServices" />
    <Reference Include="System.Net" />
    <Reference Include="System.Security" />
    <Reference Include="System.ServiceProcess" />
    <Reference Include="System.Transactions" />
    <Reference Include="WindowsBase" />
  </ItemGroup>

</Project>
